using System;
using System.Web;
using System.Web.Compilation;
using System.CodeDom;
using System.ComponentModel;
using System.Collections.Generic;
using System.Text;

namespace skmExpressionBuilders
{
    /// <summary>
    /// This generic code expression bulder was created by Dave Reed (used w/permission):
    /// http://weblogs.asp.net/infinitiesloop/archive/2006/08/09/The-CodeExpressionBuilder.aspx
    /// </summary>
    [ExpressionPrefix("Code"), ExpressionEditor("skmExpressionBuilders.Design.CodeExpressionEditor, skmExpressionBuilders")]
    public class CodeExpressionBuilder : ExpressionBuilder
    {
        public override CodeExpression GetCodeExpression(System.Web.UI.BoundPropertyEntry entry, object parsedData, ExpressionBuilderContext context)
        {
            return new CodeSnippetExpression(entry.Expression.Trim());
        }
    }
}
